//
//  BoZhuTableViewCell.m
//  Ting
//
//  Created by 安静的美男子 on 14/11/24.
//  Copyright (c) 2014年 安静的美男子. All rights reserved.
//

#import "BoZhuTableViewCell.h"

@implementation BoZhuTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        _title = [[UILabel alloc]initWithFrame:CGRectMake(10, 10, 85, 20)];
        [self.contentView addSubview:_title];
        
        _more = [[UIButton alloc]initWithFrame:CGRectMake(270, -5, 40, 50)];
        [_more setBackgroundImage:[UIImage imageNamed:@"findsection_more_n@2x.png"] forState:UIControlStateNormal];
        [self.contentView addSubview:_more];
        
        _leftBt = [[UIButton alloc]initWithFrame:CGRectMake(14, 38, 90, 90)];
        [self.contentView addSubview:_leftBt];
        
        
        
        _centerBt = [[UIButton alloc]initWithFrame:CGRectMake(115, 38, 90, 90)];
        [self.contentView addSubview:_centerBt];
        
        _rightBt = [[UIButton alloc]initWithFrame:CGRectMake(213, 38, 90, 90)];
        [self.contentView addSubview:_rightBt];
        
        _leftLb = [[UILabel alloc]initWithFrame:CGRectMake(20, 137, 70, 20)];
        [self.contentView addSubview:_leftLb];
        _leftLb.font = [UIFont systemFontOfSize:13];
        _leftLb.textAlignment = NSTextAlignmentCenter;
        
        
        
        
        _centerLb = [[UILabel alloc]initWithFrame:CGRectMake(125, 137, 70, 20)];
        [self.contentView addSubview:_centerLb];
        _centerLb.font = [UIFont systemFontOfSize:13];
        _centerLb.textAlignment = NSTextAlignmentCenter;

        
        _rightLb = [[UILabel alloc]initWithFrame:CGRectMake(223, 137, 70, 20)];
        [self.contentView addSubview:_rightLb];
        _rightLb.font = [UIFont systemFontOfSize:13];
        _rightLb.textAlignment = NSTextAlignmentCenter;

        
        
        
        
    }
    return self;
    
}
-(void)setModel:(boZhuModel *)model
{
    _title.text = model.title;
    
    NSArray *list = model.list;
    [_leftBt sd_setBackgroundImageWithURL:[list[0] objectForKey:@"smallLogo"] forState:UIControlStateNormal placeholderImage:nil];
    [_centerBt sd_setBackgroundImageWithURL:[list[1] objectForKey:@"smallLogo"] forState:UIControlStateNormal placeholderImage:nil];
    [_rightBt sd_setBackgroundImageWithURL:[list[2] objectForKey:@"smallLogo"] forState:UIControlStateNormal placeholderImage:nil];
    _leftLb.text = [list[0] objectForKey:@"nickname"];
    _centerLb.text = [list[1] objectForKey:@"nickname"];
    _rightLb.text = [list[2] objectForKey:@"nickname"];
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
